function adjustStickyPositioning(){const t=document.querySelector(".main-content-wrapper");if(!t)return null;const e=window.sectionHeaders&&window.sectionHeaders.length>0?window.sectionHeaders:Array.from(document.querySelectorAll(".section h2"));if(e.length>0&&(!window.sectionHeaders||0===window.sectionHeaders.length)&&(window.sectionHeaders=e),0===e.length)return null;e.forEach(t=>{const e=getComputedStyle(t).transform,n=e&&"none"!==e?e:"";t.dataset._origTransform=n});function n(){const t=document.getElementById("desiredTopInput");if(t){const e=parseFloat(t.value);if(Number.isFinite(e))return e}return 140}function o(e){const n=(window.sectionHeaders||[]).filter(t=>t.classList.contains("sticky-header"));if(0===n.length)return;const o=function(t){if(!t)return 1;const e=t.getBoundingClientRect(),n=getComputedStyle(t),o=t.offsetWidth||parseFloat(n.width)||0;if(o>0){const r=e.width/o,i=t.offsetHeight||parseFloat(n.height)||0;let s=r;return i>0&&(s=e.height/i),(r+s)/2}const r=n.transform;if(r&&"none"!==r){const t=r.match(/matrix\(([^)]+)\)/);if(t){const e=t[1].split(",").map(t=>parseFloat(t.trim()));if(e.length>=6&&Number.isFinite(e[0])&&Number.isFinite(e[3]))return(e[0]+e[3])/2}}return 1}(t)||1,r=document.querySelector("html");if(1==o||r.scrollTop<=120)return void(window.sectionHeaders||[]).forEach(t=>{t.style.transform=""});if(Math.abs(o-1)<.01)return void n.forEach(t=>{t.style.transform=t.dataset._origTransform||""});const i=e-50;n.forEach(t=>{const e=t.style.transform;t.style.transform=t.dataset._origTransform||"",t.offsetHeight;const n=t.getBoundingClientRect().top,r=i-n;if(Math.abs(r)<.5)return void(t.style.transform=e);const s=r/o,a=t.dataset._origTransform||"",c=`translateY(${s}px)`,d=a?`${a} ${c}`:c;t.style.transform=d})}let r=null,i=0;function s(t=!1){const e=performance.now();if(t&&e-i>=8&&null===r){i=e;return void o(n())}null===r&&(r=requestAnimationFrame(()=>{r=null,i=performance.now();o(n())}))}window.addEventListener("scroll",()=>s(!0),{passive:!0}),window.addEventListener("resize",s,{passive:!0});let a=!1;window.visualViewport&&(window.visualViewport.addEventListener("resize",s),window.visualViewport.addEventListener("scroll",s),a=!0);const c=new MutationObserver(t=>{for(const e of t)if("attributes"===e.type){s();break}});c.observe(t,{attributes:!0,attributeFilter:["style","class"]});const d=new MutationObserver(t=>{let e=!1;for(const n of t)if("attributes"===n.type&&"class"===n.attributeName){const t=n.target;if(t.classList.contains("sticky-header")){if(!t.dataset._origTransform){const e=getComputedStyle(t).transform;t.dataset._origTransform=e&&"none"!==e?e:""}e=!0}}e&&s()});e.forEach(t=>{d.observe(t,{attributes:!0,attributeFilter:["class"]})});const l=document.getElementById("desiredTopInput");return l&&l.addEventListener("input",s),requestAnimationFrame(()=>s()),function(){null!=r&&(cancelAnimationFrame(r),r=null),c.disconnect(),d.disconnect()}}"undefined"!=typeof window&&(window.adjustStickyPositioning=adjustStickyPositioning);